home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
DIRS.SWG
/
0018_Check for Directory.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-26
|
731b
|
23 lines
{*****************************************************************************
* Function ...... IsDir()
* Purpose ....... To check for the existance of a directory
* Parameters .... Dir Dir to check for
* Returns ....... TRUE if Dir exists
* Notes ......... None
* Author ........ Martin Richardson
* Date .......... May 13, 1992
*****************************************************************************}
FUNCTION IsDir( Dir: STRING ) : BOOLEAN;
VAR
fHandle: FILE;
wAttr: WORD;
BEGIN
WHILE Dir[LENGTH(Dir)] = '\' DO DEC( Dir[0] );
Dir := Dir + '\.';
ASSIGN( fHandle, Dir );
GETFATTR( fHandle, wAttr );
IsDir := ( (wAttr AND DIRECTORY) = DIRECTORY );
END;